'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  const gzip = app.middleware.gzip({ threshold: 1024 });
  router.get('/', controller.home.index);
  router.get('/book', controller.book.index);
  router.get('/book/:id', controller.book.content);
  router.get('/error', controller.error.index);
  router.get('/needgzip', gzip, app.controller.home.index);
};
